total=0
for i in range(10):
	if i%3==0:
		total+=i
print(total)